﻿package render3d.interfaces 
{
	import flash.display.BitmapData;
	import flash.events.EventDispatcher;
	import flash.geom.Matrix3D;
	import flash.geom.Vector3D;
	import render3d.CrossEngineObject3D;
	import render3d.interfaces.abstract.IRender3DAbstract;
	
	/**
	 * Wide interface of Render3D for game
	 * API to interact with any flash 3d engine
	 * @author Exey Panteleev
	 */
	public interface IRender3DAdapter extends IRender3DAbstract
	{
		function get GRID_Y_FIX():int;	
		
		// Camera
		function setCameraPosition(x:Number = NaN, y:Number = NaN, z:Number = NaN):void; // Get x or z of camera depends of Engine
		function moveCamera(forwardSpeed:Number, rightSpeed:Number, jumpSpeed:Number):void;
		function rotateCamera(x:Number = NaN, y:Number = NaN, z:Number = NaN):void;
		function lookCamera(mouseX:Number, mouseY:Number):void;
		function getCameraTransformation():Matrix3D;		
		function getCameraHeight():Number;
		function getCameraPanAngle():Number; // Get rotation in radians
		
		// 3D Objects 
		function createPlane(texture:BitmapData, width:int, height:int, type:String = ""):CrossEngineObject3D;
		function createSkybox(back:BitmapData, left:BitmapData, front:BitmapData, right:BitmapData, bottom:BitmapData, top:BitmapData):CrossEngineObject3D;
		function createSprite3D(bitmapData:BitmapData, type:String = ""):CrossEngineObject3D;
		
		// Common
		function update():void;
		function resize(stageWidth:int, stageHeight:int):void;
		
	}
	
}